clear

global folder "~/Dropbox/Papers\23CBFunctionsHistory"

cd "$folder"

use "$folder\ConstrainOrInform\01Data\CBFunctionsRevised.dta"

xtset id year


*********************
*Other support groups
*********************
gen Agrarian =  v2regsupgroups_1
gen PartyElites =  v2regsupgroups_2
gen Religious =  v2regsupgroups_7
gen LocalElites =  v2regsupgroups_8
gen UrbanMiddleClass =  v2regsupgroups_10
gen RuralMiddleClass =  v2regsupgroups_12
gen ForeignGovernment =  v2regsupgroups_13


*Gov Credit not associated with support from other groups
cloglog CBGovtCreditSurvival Aristocratic t t2 t3, vce(cl id)
estimates store GovtAristo1

cloglog CBGovtCreditSurvival Agrarian t t2 t3, vce(cl id)
estimates store GovtAgrarian1

cloglog CBGovtCreditSurvival PartyElites t t2 t3, vce(cl id)
estimates store GovtParty1

cloglog CBGovtCreditSurvival Religious t t2 t3, vce(cl id)
estimates store GovtReligious1

cloglog CBGovtCreditSurvival LocalElites t t2 t3, vce(cl id)
estimates store GovtLocal1

cloglog CBGovtCreditSurvival UrbanMiddleClass t t2 t3, vce(cl id)
estimates store GovtMiddle1

cloglog CBGovtCreditSurvival RuralMiddleClass t t2 t3, vce(cl id)
estimates store GovtRural1

cloglog CBGovtCreditSurvival ForeignGovernment t t2 t3, vce(cl id)
estimates store GovtForeign1

*Discounting not associated with Business support
cloglog CBDiscountSurvival Aristocratic t t2 t3, vce(cl id)
estimates store DiscAristo1

cloglog CBDiscountSurvival Agrarian t t2 t3, vce(cl id)
estimates store DiscAgrarian1

cloglog CBDiscountSurvival PartyElites t t2 t3, vce(cl id)
estimates store DiscParty1

cloglog CBDiscountSurvival Religious t t2 t3, vce(cl id)
estimates store DiscReligious1

cloglog CBDiscountSurvival LocalElites t t2 t3, vce(cl id)
estimates store DiscLocal1

cloglog CBDiscountSurvival UrbanMiddleClass t t2 t3, vce(cl id)
estimates store DiscMiddle1

cloglog CBDiscountSurvival RuralMiddleClass t t2 t3, vce(cl id)
estimates store DiscRural1

cloglog CBDiscountSurvival ForeignGovernment t t2 t3, vce(cl id)
estimates store DiscForeign1



********************
*xtlogit, vce(cl id)
********************

*H1
*Gov Credit not associated with Business support
xtlogit CBGovtCreditSurvival Business t t2 t3, vce(cl id)
estimates store GovxtlogitBus1

xtlogit CBGovtCreditSurvival Business InterNatWar LegislativeConst FiscalCapacity lnGDPPerCap SovDefault Inflation t t2 t3, vce(cl id)
estimates store GovxtlogitBus2

xtlogit CBGovtCreditSurvival Military t t2 t3, vce(cl id)
estimates store GovxtlogitMil1

xtlogit CBGovtCreditSurvival Military InterNatWar LegislativeConst FiscalCapacity lnGDPPerCap SovDefault Inflation t t2 t3, vce(cl id)
estimates store GovxtlogitMil2

xtlogit CBGovtCreditSurvival Military InterNatWar LegislativeConst FiscalCapacity lnGDPPerCap SovDefault Inflation t t2 t3 if Independent == 1, vce(cl id)
estimates store GovxtlogitMil3

xtlogit CBGovtCreditSurvival Military InterNatWar LegislativeConst FiscalCapacity lnGDPPerCap SovDefault Inflation t t2 t3 if Euro == 1, vce(cl id)
estimates store GovxtlogitMil4



*Private Credit is associated with Business support
xtlogit CBDiscountSurvival Business t t2 t3, vce(cl id)
estimates store PrivxtlogitBus1

xtlogit CBDiscountSurvival Business InterNatWar ElectoralDemoc UrbanRate FiscalCapacity lnGDPPerCap Inflation t t2 t3, vce(cl id)
estimates store PrivxtlogitBus2

xtlogit CBDiscountSurvival Business InterNatWar ElectoralDemoc UrbanRate FiscalCapacity lnGDPPerCap Inflation t t2 t3 if Independent == 1, vce(cl id)
estimates store PrivxtlogitBus3

xtlogit CBDiscountSurvival Business InterNatWar ElectoralDemoc UrbanRate FiscalCapacity lnGDPPerCap Inflation t t2 t3 if Euro == 1, vce(cl id)
estimates store PrivxtlogitBus4

xtlogit CBDiscountSurvival Military t t2 t3, vce(cl id)
estimates store PrivxtlogitMil1

xtlogit CBDiscountSurvival Military InterNatWar ElectoralDemoc UrbanRate FiscalCapacity lnGDPPerCap Inflation t t2 t3, vce(cl id)
estimates store PrivxtlogitMil2





*******************************************************
****full set of observations, not survival analysis****
*******************************************************

reg d.CBGovtCredit l.CBGovtCredit d.Military l.Military, vce(cl id)
estimates store ErrorCorrGovMil

reg d.CBGovtCredit l.CBGovtCredit d.Business l.Business, vce(cl id)
estimates store ErrorCorrGovBus

reg d.CBDiscount l.CBDiscount d.Business l.Business, vce(cl id)
estimates store ErrorCorrDiscBus

reg d.CBDiscount l.CBDiscount d.Military  l.Military , vce(cl id)
estimates store ErrorCorrDiscMil





************************************
****IV for security and economic****
************************************

*Construct instruments
sort year
by year: egen SumWorldInterNatWar = sum(InterNatWar)

*to match the scale of uk interest rates, I divide this by 4.
replace SumWorldInterNatWar = SumWorldInterNatWar/4
*by year: egen SumWorldDomWar = sum(DomesticConflict)

sort id year
by id: gen RollingIntconflict = sum(InterNatWar)
by id: gen CounterAfter1788 = _n - 389 if year>= 1789
gen IntWarFractionYears = RollingIntconflict / CounterAfter1788
gen SumWorldInterNatWarOtherThan = SumWorldInterNatWar - InterNatWar
gen BartikMil = SumWorldInterNatWarOtherThan * IntWarFractionYears

by id: gen RollingBusiness = sum(Business)
gen BusinessFractionYears = RollingBusiness / CounterAfter1788
gen BartikBus = LongTermBondRateUK * BusinessFractionYears


xtset id year

*Military
*First stage
reg Military LegislativeConst InterNatWar FiscalCapacity lnGDPPerCap Inflation BartikMil t t2 t3 if CBGovtCreditSurvival !=.
estimates store IVMil1First

ivcloglog CBGovtCreditSurvival InterNatWar LegislativeConst FiscalCapacity lnGDPPerCap Inflation t t2 t3, aux(Military  = BartikMil) endo(Military) vce(cl id) vhatname(vhat1) nogen show
estimates store IVMil1


*First stage
reg Military LegislativeConst InterNatWar FiscalCapacity lnGDPPerCap Inflation BartikMil t t2 t3 if CBDiscountSurvival !=.
estimates store IVMil2First

ivcloglog CBDiscountSurvival InterNatWar LegislativeConst FiscalCapacity lnGDPPerCap Inflation t t2 t3, aux(Military = BartikMil) endo(Military) vce(cl id) vhatname(vhat2) nogen show
estimates store IVMil2


*Business
*First stage
reg Business InterNatWar ElectoralDemoc InterNatWar FiscalCapacity lnGDPPerCap Inflation BartikBus UrbanRate t t2 t3 if CBGovtCreditSurvival !=.
estimates store IVBus1First


ivcloglog CBGovtCreditSurvival InterNatWar ElectoralDemoc FiscalCapacity lnGDPPerCap Inflation UrbanRate t t2 t3, aux(Business  = BartikBus) endo(Business) vce(cl id) vhatname(vhat3) nogen show
estimates store IVBus1


*First stage
reg Business InterNatWar ElectoralDemoc FiscalCapacity lnGDPPerCap Inflation UrbanRate BartikBus t t2 t3 if CBDiscountSurvival !=.
estimates store IVBus2First

ivcloglog CBDiscountSurvival InterNatWar ElectoralDemoc FiscalCapacity lnGDPPerCap Inflation UrbanRate t t2 t3, aux(Business  = BartikBus) endo(Business) vce(cl id) vhatname(vhat4) nogen show
estimates store IVBus2



sort year

*Military support, international conflict instrument
*ElectoralDemoc
by year: egen MeanBelowElectMilitary = mean(ElectoralDemoc) if Military ==0
by year: egen MeanAboveElectMilitary = mean(ElectoralDemoc) if Military ==1
by year: egen MaxMeanAboveElectMilitary = max(MeanAboveElectMilitary)
by year: egen MaxMeanBelowElectMilitary = max(MeanBelowElectMilitary)
twoway (line MaxMeanAboveElectMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowElectMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\ElectoralMil.png", replace


*InterNatWar
by year: egen MeanBelowWarMilitary = mean(InterNatWar) if Military ==0
by year: egen MeanAboveWarMilitary = mean(InterNatWar) if Military ==1
by year: egen MaxMeanAboveWarMilitary = max(MeanAboveWarMilitary)
by year: egen MaxMeanBelowWarMilitary = max(MeanBelowWarMilitary)
twoway (line MaxMeanAboveWarMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowWarMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\InternationalWarMil.png", replace

*FiscalCapacity
by year: egen MeanBelowFiscalMilitary = mean(FiscalCapacity) if Military ==0
by year: egen MeanAboveFiscalMilitary = mean(FiscalCapacity) if Military ==1
by year: egen MaxMeanAboveFiscalMilitary = max(MeanAboveFiscalMilitary)
by year: egen MaxMeanBelowFiscalMilitary = max(MeanBelowFiscalMilitary)
twoway (line MaxMeanAboveFiscalMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowFiscalMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\FiscalMil.png", replace

*lnGDPPerCap
by year: egen MeanBelowlnGDPPerCapMilitary = mean(lnGDPPerCap) if Military ==0
by year: egen MeanAbovelnGDPPerCapMilitary = mean(lnGDPPerCap) if Military ==1
by year: egen MaxMeanAbovelnGDPPerCapMilitary = max(MeanAbovelnGDPPerCapMilitary)
by year: egen MaxMeanBelowlnGDPPerCapMilitary = max(MeanBelowlnGDPPerCapMilitary)
twoway (line MaxMeanAbovelnGDPPerCapMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowlnGDPPerCapMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\GDPPerCapitaMil.png", replace

*Inflation
by year: egen MeanBelowInflationMilitary = mean(Inflation) if Military ==0
by year: egen MeanAboveInflationMilitary = mean(Inflation) if Military ==1
by year: egen MaxMeanAboveInflationMilitary = max(MeanAboveInflationMilitary)
by year: egen MaxMeanBelowInflationMilitary = max(MeanBelowInflationMilitary)
twoway (line MaxMeanAboveInflationMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowInflationMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\InflationMil.png", replace

*UrbanRate
by year: egen MeanBelowUrbanRateMilitary = mean(UrbanRate) if Military ==0
by year: egen MeanAboveUrbanRateMilitary = mean(UrbanRate) if Military ==1
by year: egen MaxMeanAboveUrbanRateMilitary = max(MeanAboveUrbanRateMilitary)
by year: egen MaxMeanBelowUrbanRateMilitary = max(MeanBelowUrbanRateMilitary)
twoway (line MaxMeanAboveUrbanRateMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowUrbanRateMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\UrbanRateMil.png", replace

*LegislativeConst
by year: egen MeanBelowLegConstMilitary = mean(LegislativeConst) if Military ==0
by year: egen MeanAboveLegConstMilitary = mean(LegislativeConst) if Military ==1
by year: egen MaxMeanAboveLegConstMilitary = max(MeanAboveLegConstMilitary)
by year: egen MaxMeanBelowLegConstMilitary = max(MeanBelowLegConstMilitary)
twoway (line MaxMeanAboveLegConstMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowLegConstMilitary year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\LegislativeMil.png", replace


*Economic support, international conflict instrument
*ElectoralDemoc
by year: egen MeanBelowElectBusiness = mean(ElectoralDemoc) if Business ==0
by year: egen MeanAboveElectBusiness = mean(ElectoralDemoc) if Business ==1
by year: egen MaxMeanAboveElectBusiness = max(MeanAboveElectBusiness)
by year: egen MaxMeanBelowElectBusiness = max(MeanBelowElectBusiness)
twoway (line MaxMeanAboveElectBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowElectBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\ElectoralEcon.png", replace

*InterNatWar
by year: egen MeanBelowWarBusiness = mean(InterNatWar) if Business ==0
by year: egen MeanAboveWarBusiness = mean(InterNatWar) if Business ==1
by year: egen MaxMeanAboveWarBusiness = max(MeanAboveWarBusiness)
by year: egen MaxMeanBelowWarBusiness = max(MeanBelowWarBusiness)
twoway (line MaxMeanAboveWarBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowWarBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\InternationalWarEcon.png", replace

*FiscalCapacity
by year: egen MeanBelowFiscalBusiness = mean(FiscalCapacity) if Business ==0
by year: egen MeanAboveFiscalBusiness = mean(FiscalCapacity) if Business ==1
by year: egen MaxMeanAboveFiscalBusiness = max(MeanAboveFiscalBusiness)
by year: egen MaxMeanBelowFiscalBusiness = max(MeanBelowFiscalBusiness)
twoway (line MaxMeanAboveFiscalBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowFiscalBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\FiscalEcon.png", replace

*lnGDPPerCap
by year: egen MeanBelowlnGDPPerCapBusiness = mean(lnGDPPerCap) if Business ==0
by year: egen MeanAbovelnGDPPerCapBusiness = mean(lnGDPPerCap) if Business ==1
by year: egen MaxMeanAbovelnGDPPerCapBusiness = max(MeanAbovelnGDPPerCapBusiness)
by year: egen MaxMeanBelowlnGDPPerCapBusiness = max(MeanBelowlnGDPPerCapBusiness)
twoway (line MaxMeanAbovelnGDPPerCapBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowlnGDPPerCapBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\GDPPerCapitaEcon.png", replace

*Inflation
by year: egen MeanBelowInflationBusiness = mean(Inflation) if Business ==0
by year: egen MeanAboveInflationBusiness = mean(Inflation) if Business ==1
by year: egen MaxMeanAboveInflationBusiness = max(MeanAboveInflationBusiness)
by year: egen MaxMeanBelowInflationBusiness = max(MeanBelowInflationBusiness)
twoway (line MaxMeanAboveInflationBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowInflationBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\InflationEcon.png", replace

*UrbanRate
by year: egen MeanBelowUrbanRateBusiness = mean(UrbanRate) if Business ==0
by year: egen MeanAboveUrbanRateBusiness = mean(UrbanRate) if Business ==1
by year: egen MaxMeanAboveUrbanRateBusiness = max(MeanAboveUrbanRateBusiness)
by year: egen MaxMeanBelowUrbanRateBusiness = max(MeanBelowUrbanRateBusiness)
twoway (line MaxMeanAboveUrbanRateBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowUrbanRateBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\UrbanRateEcon.png", replace

*LegislativeConst
by year: egen MeanBelowLegConstBusiness = mean(LegislativeConst) if Business ==0
by year: egen MeanAboveLegConstBusiness = mean(LegislativeConst) if Business ==1
by year: egen MaxMeanAboveLegConstBusiness = max(MeanAboveLegConstBusiness)
by year: egen MaxMeanBelowLegConstBusiness = max(MeanBelowLegConstBusiness)
twoway (line MaxMeanAboveLegConstBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line MaxMeanBelowLegConstBusiness year if iso=="GBR" & year >= 1789 & year < 1914) (line LongTermBondRateUK year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2)) (line SumWorldInterNatWar year if iso=="GBR" & year >= 1789 & year < 1914, yaxis(2))
graph export "$folder\08Supplementary\LegislativeEcon.png", replace







*Appendix 1
*war and CB functions -> if Euro ==1 & year <= 1860
*Government lending
esttab GovtAristo1 GovtAgrarian1 GovtParty1 GovtReligious1 GovtLocal1 GovtMiddle1 GovtRural1 GovtForeign1 using "$folder\08Supplementary\GovcloglogOtherGroups.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(chi2 p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ chi^2 $" "$ Prob > chi^2 $" "\# Observations" "Countries")) legend label style(tex)

*Discounting
esttab DiscAristo1 DiscAgrarian1 DiscParty1 DiscReligious1 DiscLocal1 DiscMiddle1 DiscRural1 DiscForeign1 using "$folder\08Supplementary\DisccloglogOtherGroups.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(chi2 p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ chi^2 $" "$ Prob > chi^2 $" "\# Observations" "Countries")) legend label style(tex)



*Appendix 2
*war and CB functions -> xtlogit
*Government lending
esttab GovxtlogitMil1 GovxtlogitMil2 GovxtlogitBus1 GovxtlogitBus2 GovxtlogitMil3 GovxtlogitMil4 using "$folder\08Supplementary\Govxtlogit.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(chi2 p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ chi^2 $" "$ Prob > chi^2 $" "\# Observations" "Countries")) legend label style(tex)

*Discounting
esttab PrivxtlogitMil1 PrivxtlogitMil2 PrivxtlogitBus1 PrivxtlogitBus2 PrivxtlogitBus3 PrivxtlogitBus4 using "$folder\08Supplementary\Discxtlogit.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(chi2 p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ chi^2 $" "$ Prob > chi^2 $" "\# Observations" "Countries")) legend label style(tex)




*Appendix 3
*IV for war
esttab IVMil1First IVMil1 IVBus1First IVBus1 IVMil2First IVMil2 IVBus2First IVBus2 using "$folder\08Supplementary\CBIVResults.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(chi2 p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ F $" "$ Prob > F $" "\# Observations" "Countries")) legend label style(tex)

esttab war2 war3 war4 war5 bus2 bus3 bus4 bus5 using "$folder\08Supplementary\CBBartikTest.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(F p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ F $" "$ Prob > F $" "\# Observations" "Countries")) legend label style(tex)

*Appendix 4
esttab ErrorCorrGovMil ErrorCorrGovBus ErrorCorrDiscMil ErrorCorrDiscBus using "$folder\08Supplementary\ErrorCorr.tex", replace nogaps title( ) mtitles("(1)" "(2)" "(3)" "(4)") nonumbers cells(b(star fmt(%9.2f)) se(par)) starlevels(* 0.1 ** 0.05 *** 0.01) nonumbers stats(chi2 p N N_clust, fmt(%9.2f %9.2f %9.0f %9.0f) labels("$ chi^2 $" "$ Prob > chi^2 $" "\# Observations" "Countries")) legend label style(tex)










reg CBGovtCredit Military InterNatWar LegislativeConst FiscalCapacity GDPPerCapita SovDefault Inflation, vce(cl id)
predict errorGovMil, residuals
reg d.CBGovtCredit d.Military d.InterNatWar d.LegislativeConst d.FiscalCapacity d.GDPPerCapita d.SovDefault d.Inflation l.errorGovMil, vce(cl id)


reg CBGovtCredit Business InterNatWar LegislativeConst FiscalCapacity GDPPerCapita SovDefault Inflation, vce(cl id)
predict errorGovBus, residuals
reg d.CBGovtCredit d.Business d.InterNatWar d.LegislativeConst d.FiscalCapacity d.GDPPerCapita d.SovDefault d.Inflation l.errorGovBus, vce(cl id)


reg CBDiscount Business, vce(cl id)
predict errorDisBus, residuals
reg d.CBDiscount l.CBDiscount d.Business l.Business l.errorDisBus, vce(cl id)


